import request from '../../util/axios'
import { serialize } from '../../util/util'

// 分页查询档案移交-导入信息
export const getImportList = (data) => {
  return request({
    url: '/yuyi-category-boot/api/transfer/import/paging',
    method: 'post',
    data
  })
}

// 删除档案移交-导入信息
export const delImportList = (data) => {
  return request({
    url: '/yuyi-category-boot/api/transfer/import',
    method: 'delete',
    data
  })
}

// 新增档案移交-导入信息
export const addImportList = (data) => {
  return request({
    url: '/yuyi-category-boot/api/transfer/import',
    method: 'post',
    data
  })
}

// 下载错误日志
export const downloadErrJournal = (id, query) => {
  return request({
    url: `/yuyi-category-boot/api/transfer/import/${id}/download`
  })
}

// 校验路径
export const checkPath = (id, query) => {
  return request({
    url: `/yuyi-category-boot/api/transfer/import/${id}/check` + serialize(query)
  })
}
// 确认接收
export const confirmReceive = (id, data) => {
  return request({
    url: `/yuyi-category-boot/api/transfer/import/${id}/confirm`,
    method: 'post',
    data
  })
}
